package day10;

import java.util.Scanner;

public class Test01 {
public static void main(String[] args) {
	/*
	 * 题目：两个字符串连接程序
	 *   */
	System.out.println("请输入两个字符串");
	Scanner sc=new Scanner(System.in);
	System.out.println("第一个");
	String str1=sc.nextLine();
	System.out.println("第二个");
	String str2=sc.nextLine();
	System.out.println(demo1(str1,str2));
	
	System.out.println(demo2(str1,str2));
	
	
}
private static String demo1(String str1,String str2) {
	return str1+str2;
	
}
private static String demo2(String str1,String str2) {
	StringBuffer sb=new StringBuffer();
	sb.append(str1).append(str2);
	return sb.toString();
	
}
}
